AL.Listenerfv(AL::POSITION, [0,0,0])
AL.Listenerfv(AL::VELOCITY, [0,0,0])
AL.Listenerfv(AL::ORIENTATION, [0,1,0,0,0,1])

AS::GameState.event_source = AS::Event

# start the main loop of the game code. Here we handle any exceptions
# that would crash the game code, and we shut down aerosol gracefully.
begin
	require((ARGV.shift or 'src/main.rb'))
rescue SystemExit, Interrupt
  puts "Exit request caught."
rescue Exception
  #	puts "Unhandled exeption caught."
  puts $!.message
  puts $!.backtrace.collect{|frame| "\t" + frame.sub(AS::LIB_DIR, "$(AS::LIB_DIR)")}
end

print "Shutting down Aerosol ... "
AS.exit
puts "Successful!"

GC.start
